#include "pch.h"

TEST(TestIntersect, translatePostion) {

	Eigen::Vector3f worldPos(1.5f, 3.0f, 2.5f);
	Eigen::Vector3f expect(0.5f, -2.0f, -3.0f);
	Eigen::Matrix4f worldToLocal;
	worldToLocal << -1.0f, 0.0f, 0.0f, 2.0f,
		0.0f, 1.0f, 0.0f, -5.0f,
		0.0f, 0.0f, -1.0f, -0.5f,
		0.0f, 0.0f, 0.0f, 1.0f;

	Eigen::Vector3f result = CMathFunctions::translatePostion(worldPos, worldToLocal);

	EXPECT_FLOAT_EQ(result[0], expect[0]);
	EXPECT_FLOAT_EQ(result[1], expect[1]);
	EXPECT_FLOAT_EQ(result[2], expect[2]);
}